Accessing "Mapi32.dll" with C#. [not solved]
Posted
by Code Smack
on Stack Overflow
See other posts from Stack Overflow
or by Code Smack
Published on 2010-05-06T09:01:44Z
Indexed on
2010/05/07
8:38 UTC
Read the original article
Hit count: 241
Hello,
I am using VS 2008 C# Windows Application.
I have this DLL Import I am trying to use.
[DllImport("Mapi32.dll", PreserveSig = true)]
private static extern void
WrapCompressedRTFStream(
[MarshalAs(UnmanagedType.Interface)]
UCOMIStream lpCompressedRTFStream,
uint ulflags,
[MarshalAs(UnmanagedType.Interface)]
out UCOMIStream lpUncompressedRTFStream
);
public const uint MAPI_MODIFY = 0x00000001;
public const uint STORE_UNCOMPRESSED_RTF = 0x00008000;
I have a compressed string that is in CompressedRFTFormat.
How do I pass the string into the WrapCompressedRTFStream? I do not understand what the method is expecting.
I am trying to use it on a button.
RichText1.text = WrapCompressedRTFStream(_CompressedRichText.ToString(),something,somethingelse);
The first error I get is "cannot convert from 'string' to 'System.Runtime.InteropServices.UCOMIStream"
I hope someone who understands this posts an answer that helps!
© Stack Overflow or respective owner